package com.wuseguang.springcloud.entity;

import java.io.Serializable;


import lombok.Data;
import org.springframework.util.StringUtils;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * <p>
 * 教师评分限制表
 * </p>
 *
 * @author 
 * @since 2020-06-24
 */
@Entity
@Data
public class TeacherRatingLimit {

    private static final long serialVersionUID = 1L;

    /**
     * 教师评分限制表id
     */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	private Integer id;
    /**
     * 教师id
     */
	private Integer teacherId;
    /**
     * 班主任分数
     */
	private Integer classTeacherScore;
    /**
     * 任课老师总分
     */
	private Integer teacherScore;
    /**
     * 总分(以周为单位)
     */
	private Integer totalScore;
    /**
     * 剩余分数(以周为单位)
     */
	private Integer remainingScore;
    /**
     * 班级id
     */
	private Integer classId;
	/**
	 * 学校id
	 */
	private Integer schoolId;


	public Integer getClassTeacherScore() {

		if(StringUtils.isEmpty(classTeacherScore)){
			return 0;
		}

		return classTeacherScore;
	}

	public Integer getTeacherScore() {
		if(StringUtils.isEmpty(teacherScore)){
			return 0;
		}
		return teacherScore;
	}

	public Integer getTotalScore() {
		if(StringUtils.isEmpty(totalScore)){
			return 0;
		}
		return totalScore;
	}

	public Integer getRemainingScore() {
		if(StringUtils.isEmpty(remainingScore)){
			return 0;
		}
		return remainingScore;
	}
}
